package aima.search;

import java.lang.*;
import java.util.*;

/**
   Bundles together a new state, the name of the operator used to
   get there, and the cost of the operation.
*/

public final class Successor {

/** Successor State */
  protected State state;
/** Operation to reach successor */
  protected String operatorName;
/** Cost of operation */
  protected float cost;

/**
  Constructor sets all values of successor object.
*/
  public Successor(State state, String operatorName, float cost) {
     this.state = state; 
     this.operatorName = operatorName;
     this.cost = cost;
  }

/**
  Returns string describing operation. 
*/
  public String getOperatorName() {
    return operatorName;
  }

/**
  Returns cost of performing operation.
*/
  public float getCost() {
    return cost;
  }

/**
  Returns new state.
*/
  public State getState() {
    return state;
  }

}
